
<%@ page import="com.scalar.chiptrack.users.User,
                com.scalar.chiptrack.utils.ConfigManager"%>
<%@ page import="com.scalar.chiptrack.commons.SessionKeys" %>

<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<%String chipTracContextString = "/" + ConfigManager.getChipTracContext();%>

<SCRIPT language="JavaScript">
function changePassword()
{
    newWindow = window.open ('<%=chipTracContext%>/changePassword.do','optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=yes,scrollbars=no,width=500,height=270,resizable=no');
    newWindow.focus();
}
</SCRIPT>

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD rowSpan=3><A href="http://www.scalarsoft.com" onMouseOver="window.status='www.scalarsoft.com';return true" onMouseOut="window.status='';return true"><IMG height=72
      src="<%=chipTracContextString%>/jsp/includes/images/scalar_logo.jpg" width=180 border=0></A></TD>
    <TD rowSpan=3><IMG height=72 src="<%=chipTracContextString%>/jsp/includes/images/blue_gutter.gif" width=10></TD>
    <TD background="<%=chipTracContextString%>/jsp/includes/images/blue_line.gif" rowSpan=2><IMG height=52 src="<%=chipTracContextString%>/jsp/includes/images/blue_line.gif" width=1></TD>
    <TD background="<%=chipTracContextString%>/jsp/includes/images/blue_gradient_bg.gif" rowSpan=2><IMG height=52 src="<%=chipTracContextString%>/jsp/includes/images/blue_gradient.gif" width=105></TD>
    <TD align=right width="100%" background="<%=chipTracContextString%>/jsp/includes/images/blue_gradient_bg2.gif" rowSpan=2><IMG height=52 src="<%=chipTracContextString%>/jsp/includes/images/spacer.gif" width=1></TD>
    <TD background="<%=chipTracContextString%>/jsp/includes/images/blue_gradient_bg2.gif"><IMG height=30 src="<%=chipTracContextString%>/jsp/includes/images/spacer.gif" width=135></TD>
    <TD noWrap align=right background="<%=chipTracContextString%>/jsp/includes/images/blue_gradient_bg2.gif" colSpan=5>
    <%
        boolean loggedIn = false;
        //User user = (User) session.getAttribute("ExtUser");
        User user = (User) session.getAttribute(SessionKeys.USER_KEY );
        String userId = "";
        String userName = "";
        if (user != null) {
            loggedIn = true;
            userName = user.getFirstName() + " " + user.getLastName();
            userId = user.getUserId();
        }
    %>

    <SPAN class=footer_element><%if (loggedIn) out.print ("You are logged in as <b>" + userName + " (" + userId + ")</b>"); else out.println ("You are not logged in");%>&nbsp;
      <br><b>
        <!--&lt;&lt;&nbsp;<A class=footer_element
      href="<%=chipTracContextString%>/externalUserLogin.do" onMouseOver="window.status='Click here to go home page';return true" onMouseOut="window.status='';return true">[Home]</A>
      &nbsp;&nbsp;<A href="javascript:changePassword();" class=footer_element onMouseOver="window.status='Click here to change your password';return true" onMouseOut="window.status='';return true">[Change Password]</A>
      &nbsp;&nbsp;<A href="#" class=footer_element onMouseOver="window.status='Click here for help page';return true" onMouseOut="window.status='';return true">[Help]</A>&nbsp;&nbsp;-->



      <%
          String ps1 = request.getParameter( "ps" );
          String cstKey1 = request.getParameter( "cstKey" );
          if (loggedIn) { %>
                <A class=footer_element href="<%=chipTracContextString%>/logoff.do" onMouseOver="window.status='Click here to logoff';return true" onMouseOut="window.status='';return true">[Log Off]</A>&nbsp;&nbsp;
      <% } else { %>
                <A class=footer_element href="<%=chipTracContextString%>/jsp/index.jsp" onMouseOver="window.status='Click here to Log In';return true" onMouseOut="window.status='';return true">[Log In]</A>&nbsp;&nbsp;
      <% } %>
    </b></SPAN></TD></TR>

   <TR><TD colspan=9 background="<%=chipTracContextString%>/jsp/includes/images/blue_gradient_bg2.gif"></TD></TR>
  <%--<TR>
    <TD colspan=7>
    <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
    <TR>
    <TD background="<%=chipTracContextString%>/jsp/includes/images/tab_bg.gif"></TD>
    <TD height='21' background="<%=chipTracContextString%>/jsp/includes/images/tab_bg.gif">
    	<IMG border="0" height=21 src="<%=chipTracContextString%>/jsp/includes/images/tab_eng.gif"></TD>
    <TD height='21' background="<%=chipTracContextString%>/jsp/includes/images/tab_bg.gif">
    	<IMG border="0" height=21 src="<%=chipTracContextString%>/jsp/includes/images/tab_opr.gif"></TD>
    <TD height='21' background="<%=chipTracContextString%>/jsp/includes/images/tab_bg.gif">
	 	<IMG border="0" height=21 src="<%=chipTracContextString%>/jsp/includes/images/tab_mktg.gif"></TD>
    <TD height='21' background="<%=chipTracContextString%>/jsp/includes/images/tab_bg.gif">
    	<IMG border="0" height=21 src="<%=chipTracContextString%>/jsp/includes/images/tab_finance.gif"></TD>
    <TD height='21' background="<%=chipTracContextString%>/jsp/includes/images/tab_bg.gif">
    	<IMG border="0" height=21 src="<%=chipTracContextString%>/jsp/includes/images/tab_sales.gif"></TD>
    <TD height='21' background="<%=chipTracContextString%>/jsp/includes/images/tab_bg.gif">
    	<IMG border="0" height=21 src="<%=chipTracContextString%>/jsp/includes/images/tab_admin.gif"></TD>
    <TD height='21' background="<%=chipTracContextString%>/jsp/includes/images/tab_bg.gif"></TD></TR>
    </TABLE></TD></TR>--%>
  <TR>
    <TD><IMG border="0" height=20 src="<%=chipTracContextString%>/jsp/includes/images/blue_line_tip.gif" width=1></TD>
    <TD><IMG border="0" height=20 src="<%=chipTracContextString%>/jsp/includes/images/spacer.gif" width=1></TD>
    <TD colspan=7><IMG border="0" height=20 src="<%=chipTracContextString%>/jsp/includes/images/spacer.gif" width=1></TD></TR>
</TBODY>
</TABLE>